﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Configuration;
using System.Web.Security;
using myMvcBlog.Area.Admin.Models;

namespace myMvcBlog.Areas.Admin.Controllers
{
    public class AdminController : AdminBaseController
    {
        //
        // GET: /Admin/

        public ActionResult Index()
        {
            AdminHomeView homeView = new AdminHomeView();

            homeView.PostCount = Post.All().Count();
            homeView.CategoryCount = Category.All().Count();
            homeView.CommentCount = Comment.All().Count();
            homeView.TagCount = myMvcBlog.Tag.All().Count();

            return View(homeView);
        }
    }
}
